<svg xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink"
     class="reftest-wait"
     onload="
        document.documentElement.pauseAnimations();
        document.documentElement.setCurrentTime(0);
        document.getElementById('a').beginElementAt(0.5);
        setTimeAndSnapshot(2, false)">
  <script xlink:href="../smil-util.js" type="text/javascript"/>
  <!--
    Originally the third animation's interval is from 1s->3s, but then by
    script we add another begin time to 'a' at 0.5, and since 'a' can't
    restart, this is the only begin time it will ever generate. Therefore, all
    the ends for animation 'b' are before the begin, and there's no valid
    interval.
   -->
  <rect width="100" height="100" fill="green">
    <animate attributeName="y" attributeType="XML" from="0" to="0" id="a"
      begin="3s" dur="10s" restart="never"/>
    <animate attributeName="y" attributeType="XML" from="0" to="0" id="b"
      begin="1s" end="a.begin" dur="3s"/>
    <animate attributeName="fill" attributeType="CSS"
      values="red; red"
      begin="b.begin" dur="2s"/>
  </rect>
</svg>
